import React from 'react'
import { useNavigate, Outlet } from 'react-router-dom'
import { Toast, NavBar } from 'react-vant';
import '../../scss/fan/index.scss'
import Fotter from './login/Loginfotter'
import usePathName from '../../hooks/pathname'
export default function index() {
  let pathName = usePathName()
  let navigate = useNavigate()
  return (
    <div className='index'>
      <div className='header'>
        <NavBar
        className='nav'
        title={pathName}
        leftText="返回"
        onClickLeft={() => navigate(-1)}
        />
      </div>
      <div className='box'>
        <Outlet></Outlet>
      </div>
      <div className='footer'>
        <Fotter></Fotter>
      </div>
    </div>
  )
}
